<!--{include manage_header}-->

<div id="bdw" class="bdw">
<div id="bd" class="cf">
<div id="leader">
	<div class="dashboard" id="dashboard">
		<ul>${mcurrent_news('news')}</ul>
	</div>
	<div id="content" class="clear mainwide">
        <div class="clear box">
            <div class="box-top"></div>
            <div class="box-content">
                <div class="head">
				<!--{if $news['id']}-->
					<h2>编辑广告图</h2>
					<ul class="filter">${current_managenews('edit', $news['id'])}</ul>
				<!--{else}-->
					<h2>新建广告图</h2>
				<!--{/if}-->
				</div>
                <div class="sect">
				<form id="-user-form" method="post" action="/manage/news/edit.php?id={$news['id']}"  enctype="multipart/form-data"  class="validator">
					<input type="hidden" name="id" value="{$news['id']}" />
					<div class="field">
						<label>标题</label>
						<input type="text" size="30" name="title" id="team-create-title" class="f-input" value="${htmlspecialchars($news['title'])}" datatype="require" require="true" />
					</div>
					<div class="field">
						<label>链接</label>
						<input type="text" size="30" name="detail" id="team-create-detail" class="f-input" value="${htmlspecialchars($news['detail'])}" />
					</div>
					
					<div class="field" style="display:none;">
						<label>时间</label>
						<input type="text" size="10" name="begin_time" id="team-create-begin-time" class="date" xd="${date('Y-m-d', $news['begin_time'])}" xt="${date('H:i:s', $news['begin_time'])}" value="${date('Y-m-d H:i:s', $news['begin_time'])}" maxLength="10" />
					</div>
					<div class="field">
						<label>广告图片</label>
						<input type="file" size="30" name="image" id="team-create-image" class="f-input" />
						<!--{if $news['image']}--><span class="hint">${team_image($news['image'])}</span><!--{/if}-->
					</div>
					
					</div>
					<input type="submit" value="提交" name="commit" id="leader-submit" class="formbutton" style="margin:10px 0 0 120px;"/>
				</form>
                </div>
            </div>
            <div class="box-bottom"></div>
        </div>
	</div>
</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->
<script type="text/javascript">
window.x_init_hook_teamchangetype = function(){
	X.team.changetype("{$team['team_type']}");
};
window.x_init_hook_page = function() {
	X.team.imageremovecall = function(v) {
		jQuery('#team_image_'+v).remove();
	};
	X.team.imageremove = function(id, v) {
		return !X.get(WEB_ROOT + '/ajax/misc.php?action=imageremove&id='+id+'&v='+v);
	};
};
</script>
<!--{include manage_footer}-->
